<!DOCTYPE html>
<title>Test video dimensions.</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<video width="100" height="50"></video>
<script>
test(function() {
    var video = document.querySelector("video");
    assert_equals(video.width, 100);
    assert_equals(video.height, 50);
    assert_equals(video.offsetWidth, 100);
    assert_equals(video.offsetHeight, 50);

    video.setAttribute("width", "200");
    video.setAttribute("height", "100");
    assert_equals(video.width, 200);
    assert_equals(video.height, 100);
    assert_equals(video.offsetWidth, 200);
    assert_equals(video.offsetHeight, 100);

    video.width = 400;
    video.height = 200;
    assert_equals(video.getAttribute("width"), "400");
    assert_equals(video.getAttribute("height"), "200");
    assert_equals(video.offsetWidth, 400);
    assert_equals(video.offsetHeight, 200);
});
</script>